package com.ido.otaclient.base;

import android.os.Environment;

import java.io.File;

/**
 * Copyright (c) 2019 深圳市爱都科技有限公司. All rights reserved.
 *
 * @Author: xyb
 * @CreateDate: 2020-02-14 09:38
 * @description
 */
public class Constant {
    /**
     * 监听的端口号
     */
    public static final int HTTP_PORT = 5000;

    /**
     * 监听第二个端口
     */
    public static final int HTTP_PORT_TWO = 6000;

    /**
     * 监听第三个端口
     */
    public static final int HTTP_PORT_THREE = 7000;

    /**
     * 连接失败次数
     */
    public static final int CONNECT_FAIL_COUNT = 3;

    /**
     * 请求失败次数
     */
    public static final int REQUEST_FAIL_COUNT = 6;

    /**
     * 保存的文件夹
     */
    public static final String DIR_IN_SDCARD = "otaServer";


    /**
     * 保存的文件夹
     */
    public static final String DIR_OUT_SDCRA = Environment.getExternalStorageDirectory()
            + File.separator + "otaClient";

    /**
     * 文件的文件夹
     */
    public static final String DIR_IN_SDCARD_UPLOAD =
            DIR_OUT_SDCRA  + File.separator + "upload";
    /**
     * 压缩的文件
     */
    public static final String DIR_IN_SDCARD_UPLOAD_zip =
            DIR_OUT_SDCRA  + File.separator + "upload.zip";

    public static final File DIR = new File(Environment.getExternalStorageDirectory() +
            File.separator + Constant.DIR_IN_SDCARD);

    /**
     * 升级平台Nordic 平台
     */
    public static final String PLATFORM_NAME_NORDIC = "Nordic";
    /**
     * 升级平台Realtk 平台
     */
    public static final String PLATFORM_NAME_REALTK = "Realtk";
    /**
     * nordic 升级
     */
    public static final String TASK_NAME_NORDIC = "nordic";
    /**
     * realtk 升级
      */
    public static final String TASK_NAME_REALTK = "realtk";
    /**
     * 二合一升级
     */
    public static final String TASK_NAME_TWO_TO_ONE = "twoToOne";
    /**
     * 三合一升级
     */
    public static final String TASK_NAME_THREE_TO_ONE = "threeToOne";
    /**
     * 四合一升级
     */
    public static final String TASK_NAME_FOUR_TO_ONE = "fourToOne";
    /**
     * 字库+新固升级
     */
    public static final String TASK_NAME_FONT = "fontToOne";

    /**
     * B + 字库 + 新固升级
     */
    public static final String TASK_NAME_FONT_B = "fontBToOne";

    /**
     * 返回单板的集合
     */
    public static final int REQUEST_CODE_LIST = 1001;


}
